package com.liuguang.realgateway.config;

import com.liuguang.realgateway.handler.MyTestHandler;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.reactive.function.server.RequestPredicates;
import org.springframework.web.reactive.function.server.RouterFunction;
import org.springframework.web.reactive.function.server.RouterFunctions;
import org.springframework.web.reactive.function.server.ServerResponse;

/**
 * @ClassName: MyTestHandlerConfig
 * @Description：
 * @Author: wanghr
 * Date: 3:58 PM 2020/10/30
 * Version: 1.0
 */
@Configuration
public class MyTestHandlerConfig {

    @Bean(value = "myTestHandler")
    public RouterFunction getMyTestHandler() {
        return RouterFunctions
                .route(RequestPredicates
                        .GET("/test/getvalidatecode1"),new MyTestHandler());
    }
}
